package me.xinping.libs.utils

import android.os.Environment
import java.io.File

/**
 * 文件工具.
 * <p>
 * Date 2018/12/4
 * @author fanxinping_cd@keruyun.com
 */
object FileUtils {
    val RECORD_ROOT_PATH = Environment.getExternalStorageDirectory()
        .absolutePath
        .plus(File.separator)
        .plus("record")
        .plus(File.separator)

    /**
     * 删除文件
     */
    fun deleteRecorderFile(filePath: String) {
        if (!filePath.isEmpty()) {
            val file = File(filePath)
            if (file.exists()) {
                file.delete()
            }
        }
    }
}